var divide = function(a, b) {
    let i = 0
    let c = a
    while( Math.abs(c) >= Math.abs(b) ){
        c = Math.abs(c) - Math.abs(b)
        i++
    }
    if(Math.abs(b) == 1) i++
    return (b < 0 && a > 0) || (a < 0 && b > 0) ? -i : i
};
console.log(divide(15,2))